package com.zz.slick;

import org.newdawn.slick.*;
import org.newdawn.slick.state.*;

import com.zz.art.Art;

public class Game extends StateBasedGame implements Runnable{

	public static final String name = "ZzProject";
	public static final int menu = 0;
	public static final int levelSelect = 1;
	public static final int play = 2;
	
	public Game(String name) {
		super(name);
		this.addState(new Menu(menu));
		this.addState(new LevelSelect(levelSelect));
		this.addState(new Play(play));
	}

	public static void main(String[] args) {
		AppGameContainer appgc;
		try {
			appgc = new AppGameContainer(new Game(name));
			appgc.setDisplayMode(Options.getResX(), Options.getResY(), Options.isFullScreen());
			appgc.start();
		}catch(SlickException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void initStatesList(GameContainer gc) throws SlickException {
		this.getState(menu).init(gc, this);
		this.getState(levelSelect).init(gc, this);
		this.getState(play).init(gc, this);
		Art.loadImages();
		this.enterState(menu);
	}

	@Override
	public void run() {
		// TODO Auto-generated method stub
		
	}
}
